<?php
namespace app\index\controller;
use think\Request;
use think\controller\Rest;
class Apply extends Rest{
    public function readAll(){
        $model = model('Apply');
        $data=$model->select();
        return json($data);
    }
    public function add(){
        $model = model('Apply');
    	$data['phone']=input('param.phone');
    	$data['email']=input('param.email');
    	$data['name']=input('param.name');
    	$data['course']=input('param.course');
    	$data['gender']=input('param.gender');
        // $data[];
        $res=$model->insert($data);
        return json($data);
    }
}